<?php

namespace App\Remote\Rms;

use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Facades\Log;

class RmsMqttRemote extends BaseRmsRemote
{

    const MQTT_COMMAND_FEE_ORDER = 'feeOrderRemind';  //年费订单MQTT

    /**
     * 发送MQTT
     *
     * @param int $shopId
     * @param string $command
     * @param array $params
     * @return mixed|void
     * @throws GuzzleException
     */
    public static function sendMqtt(int $shopId, string $command, array $params)
    {
        Log::info('发送MQTT 门店：' . $shopId,
            [
                'prams' => [
                    "shopId"     => $shopId,
                    'params'     => $params,
                    'command'    => $command,
                ]
            ]);
        return self::customRequest(
            "api/internal/sendMqtt",
            "post",
            [
                "shopId"     => $shopId,
                'params'     => $params,
                'command'    => $command,
            ]
        );
    }
}
